
var areaData = {
	'sheng' : ["江西省","广东省","江苏省","安徽省","浙江省"],
	
	'shi' : {
		'a_0' : ["抚州市","南昌市","九江市"],
		'a_1' : ["深圳市","广州市","东莞市"],
		'a_2' : ["苏州市","无锡市","南京市"],
		'a_3' : ["合肥市","芜湖市"],
		'a_4' : ["杭州市"]
	},
	

};


$(function() {

	var sheng = areaData.sheng;
	var $sheng = $('#sheng');
	var $shi = $('#shi');
	var $xian = $('#xian');
	var shiIndex = 0;
	for(var i = 0; i < sheng.length; i++) {
		var $option = $('<option value=' + (i + 1) + '>' + sheng[i] + '</option>');
		$sheng.append($option);
	}
	$sheng.change(function() {
		shiIndex = this.selectedIndex - 1;
		if(shiIndex < 0) {

		} else {
			var shi = areaData.shi['a_' + shiIndex];
			$shi.html('<option value="0">市</option>');
			for(var i = 0; i < shi.length; i++) {
				var $option = $('<option value=' + (i + 1) + '>' + shi[i] + '</option>');
				$shi.append($option);
			}
		}
	});
});